package com.ruoyi.video.domain;

import com.alibaba.fastjson2.JSONObject;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 视频文案对象 video_line_item
 * 
 * @author ruoyi
 * @date 2025-10-06
 */
public class VideoLineItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 起始时间 */
    @Excel(name = "起始时间")
    private String startTime;

    /** 截至时间 */
    @Excel(name = "截至时间")
    private String endTime;

    /** 原文 */
    @Excel(name = "原文")
    private String originalText;

    /** 中文 */
    @Excel(name = "中文")
    private String translatedText;

    /** 改写文案 */
    @Excel(name = "改写文案")
    private String changeText;

    /** 解析ID */
    @Excel(name = "解析ID")
    private Long videoAnalysisId;

    /** 视频ID */
    @Excel(name = "视频ID")
    private Long videoId;

    private Long userId;

    public VideoLineItem(){}

    public VideoLineItem(Long userId, Long videoId, JSONObject jsonObject){
        setUserId(userId);
        setVideoId(videoId);
        setStartTime(jsonObject.getString("start_time"));
        setEndTime(jsonObject.getString("end_time"));
        setOriginalText(jsonObject.getString("original_text"));
        setTranslatedText(jsonObject.getString("translated_text"));
    }

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setStartTime(String startTime) 
    {
        this.startTime = startTime;
    }

    public String getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(String endTime) 
    {
        this.endTime = endTime;
    }

    public String getEndTime() 
    {
        return endTime;
    }

    public void setOriginalText(String originalText) 
    {
        this.originalText = originalText;
    }

    public String getOriginalText() 
    {
        return originalText;
    }

    public void setTranslatedText(String translatedText) 
    {
        this.translatedText = translatedText;
    }

    public String getTranslatedText() 
    {
        return translatedText;
    }

    public void setChangeText(String changeText) 
    {
        this.changeText = changeText;
    }

    public String getChangeText() 
    {
        return changeText;
    }

    public void setVideoAnalysisId(Long videoAnalysisId) 
    {
        this.videoAnalysisId = videoAnalysisId;
    }

    public Long getVideoAnalysisId() 
    {
        return videoAnalysisId;
    }

    public void setVideoId(Long videoId) 
    {
        this.videoId = videoId;
    }

    public Long getVideoId() 
    {
        return videoId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("originalText", getOriginalText())
            .append("translatedText", getTranslatedText())
            .append("changeText", getChangeText())
            .append("videoAnalysisId", getVideoAnalysisId())
            .append("videoId", getVideoId())
            .append("createBy", getCreateBy())
            .toString();
    }
}
